#!/usr/bin/env python
import os;

VERSION = "1.2.0"
APPNAME = "octopus"

top = '.'
out = 'build'

def options(opt):
	opt.load('compiler_c vala')

def configure(conf):
	conf.load('compiler_c vala')

	conf.check_cfg(package='clutter-1.0', uselib_store='CLUTTER', args='--cflags --libs', mandatory=True)
	conf.check_cfg(package='clutter-gtk-1.0', uselib_store='CLUTTER_GTK', args='--cflags --libs', mandatory=True)
	conf.check_cfg(package='gdk-pixbuf-2.0', uselib_store='GDK_PIXBUF', args='--cflags --libs', mandatory=True)
	conf.check_cfg(package='gee-1.0', uselib_store='GEE', args='--cflags --libs', mandatory=True)
	conf.check_cfg(package='gjs-1.0', uselib_store='GJS', args='--cflags --libs', mandatory=True)
	conf.check_cfg(package='glib-2.0', uselib_store='GLIB', args='--cflags --libs', mandatory=True)
	conf.check_cfg(package='gobject-introspection-1.0', uselib_store='GI', args='--cflags --libs', mandatory=True)
	conf.check_cfg(package='mx-2.0', uselib_store='MX', args='--cflags --libs', mandatory=True)
	conf.check_cfg(package='xmms2-client-glib', uselib_store='XMMS_GLIB', args='--cflags --libs', mandatory=True)
	conf.check_cfg(package='xmms2-client', uselib_store='XMMS', args='--cflags --libs', mandatory=True)

	conf.define('PACKAGE', APPNAME)
	conf.define('VERSION', VERSION)
	conf.define('DATAPATH', os.path.join(conf.env['DATADIR'], APPNAME))
	conf.define('LIBPATH', os.path.join(conf.env['LIBDIR'], APPNAME))

	conf.write_config_header ('config.h')

def build(bld):
	bld.recurse(['src', 'ui', 'data'])

